#include "parsercontainer.h"

ParserContainer* ParserContainer::instance = 0;

ParserContainer* ParserContainer::getInstance()
{
  if ( !instance ) {
    instance = new ParserContainer();
  }

  return instance;
}

ParserContainer::ParserContainer()
{
  qDebug() << "Parser container constructor called";
  chat = new ParserChat();
}


void ParserContainer::processLine( const QString& str )
{
  if ( chat->needProcessLine( str ) )
    chat->processLine( str );
}


ParserContainer::~ParserContainer()
{
  qDebug() << "Parser container destructor called";
  delete instance;
  delete chat;
}

